package cn.mybatis.seeumt.service.impl;

import cn.mybatis.seeumt.entity.UserInfo;
import cn.mybatis.seeumt.mapper.UserInfoMapper;
import cn.mybatis.seeumt.service.IUserInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author Seeumt
 * @since 2019-12-13
 */
@Service
public class UserInfoServiceImpl implements IUserInfoService {

    @Autowired
    private UserInfoMapper userInfoMapper;
    @Override
    public PageInfo<UserInfo> query(Integer num, Integer size) {
        PageHelper.startPage(num, size);
        List<UserInfo> userDOS = userInfoMapper.selectList(null);
        PageInfo<UserInfo> pageInfo = new PageInfo<>(userDOS);
        return pageInfo;
    }
}
